package com.qingneng.budget.dao;

import java.util.List;

import com.qingneng.budget.common.AbsBaseDaoImpl;
import com.qingneng.budget.vo.Userinfo;

public class UserinfoDAO extends AbsBaseDaoImpl{

	@Override
	protected String getInsertSql() {
		return "qn_db_userinfo.abatorgenerated_insert";
	}

	@Override
	protected String getUpdateByPrimaryKeySql() {
		return "qn_db_userinfo.abatorgenerated_updateByPrimaryKey";
	}

	@Override
	protected String getUpdateByPrimaryKeySelectiveSql() {
		return "qn_db_userinfo.abatorgenerated_updateByPrimaryKeySelective";
	}

	@Override
	protected String getDeleteByPrimaryKeySql() {
		return "qn_db_userinfo.abatorgenerated_deleteByPrimaryKey";
	}

	@Override
	protected String getQueryBySelectiveSql() {
		// TODO Auto-generated method stub
		return "qn_db_userinfo.select_userinfo_sql";
	}

	@Override
	protected String getQueryBySelectiveCountSql() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String getSelectByEntityIdSql() {
		// TODO Auto-generated method stub
		return null;
	}

	public Userinfo getLoginUserInfo(Userinfo bean){
		Userinfo userinfo = (Userinfo)getSqlMapClientTemplate().queryForObject("qn_db_userinfo.select_userinfo_sql",bean);
		return userinfo;
	}
	public List getUserInfoList(){
		return  getSqlMapClientTemplate().queryForList("qn_db_userinfo.select_alluserinfo_sql");
	}
	
	public void modify(Userinfo userinfo){
		getSqlMapClientTemplate().insert("qn_db_userinfo.abatorgenerated_insert", userinfo);
	}
  
}